Use 204 to express no_content#2586
Conversation
| <div v-else-if="bodyState.failed_to_load" class="alert alert-info">Message body unavailable.</div> | ||
| <LoadingSpinner v-else-if="bodyState.loading" /> | ||
| <div v-else-if="body === ''" class="alert alert-info">Body was too large and not stored. Edit ServiceControl/MaxBodySizeToStore to be larger in the ServiceControl configuration.</div> | ||
| <div v-else-if="bodyState.data.no_content" class="alert alert-info">Body was too large and not stored. Edit ServiceControl/MaxBodySizeToStore to be larger in the ServiceControl configuration.</div> |
There was a problem hiding this comment.
Is it accurate to say that we only return 204 when the body is not stored because it was too large?
And we return 404 when the body is not found at all?
There was a problem hiding this comment.
@johnsimons it used to be the case, at least in the past. I can double-check a few things. The logic was always that when the body is not stored, the BodyNotStored metadata was added which then was the indicator for a record to be there and not null but no content being stored.
but it seems now we always set HasResult to true in Raven
but the InMemory one has the correct previous behavior
Have to do some more research directly in the code. Like I said I ran out of time yesterday ;)
There was a problem hiding this comment.
It is indeed like I said. MessageBodyView differs between NotFound and NoContent which is respected when no attachement could be found and no attachements are stored when it is over the configured max size (else branch).
5fb8f03 to
44ac18a
Compare
|
Base branch has been changed to follow this approach |
Suggested changes for #2585
ServiceControl returns NoContent (204) for bodies that are not stored
This has already been used by ServiceInsight